<template>
    <div>
        <div class="card-header">
            <span>{{title}}</span>
        </div>

        <div class="card-content">
            <b><span>{{count}}</span></b>
        </div>

        <!-- 图表 -->
        <div class="card-charts">
           <!-- 具名插槽 -->
            <slot name="charts"></slot>
        </div>

        <div class="card-footer">
            <!-- 具名插槽 -->
            <slot name="footer"></slot>
        </div>
    </div>
</template>

<script>
export default {
    name:'Detail',
    props:['title','count']
}
</script>

<style lang="less" scoped>
.card-header{
    display: flex;
    justify-content: space-between;
    color: #cfcccc;
}
.card-content{
  font-size: 30px;
  padding: 10px 0px;
  b span{
    background-color:#f56c6c;
    color: #fff;
  }
}
.card-charts{
  margin: 10px 0 10px 0;
  height: 45px;
   span svg{
      margin-right: 5px;
  }
}
.card-footer{
  border-top: 1px solid #eee;
  padding-top: 10px;

  b{
      background-color:#66b1ff;
      color: #fff;
  }
  span svg{
      margin-right: 5px;
  }

}
</style>